package com.baihui.taobao.authorize;

import java.util.Date;

/**
 * Created by Kevin.
 * User: HSZM1106-0312
 * Date: 11-12-30
 * Time: 下午9:26
 */
public class TaoBaoSessionInfo {
//    public static final int TB_MAX_COUNT = 200;
//    public static final int BH_MAX_COUNT = 1000;
    private String appKey;
    private TopParameter topParameter;
    private String topSession;
    private String appSecret;
    private int visitor_id;
    private int user_id;
    private String visitor_nick;
    // 最后同步的时间
    private Date lastSyncTime;
    private long expires_in;
    private boolean valid = false;
     //子帐号ID
    private int sub_visitor_id;
    //子帐号nick
    private String sub_visitor_nick;
    
    //商品导入进度
    private int productImportProgress=-1;
    
    //类目导入进度
    private int itemCatImportProgress=-1;
    
    //订单导入进度
    private int orderImportProgress=-1;
    
    //密码
    private String parentbaihuipw = null;
    private String parentbaihuiuserid = null;
    private String crmApiKey = null;
    
    private int tbMaxCount = 200;
    private int bhMaxCount = 1000;

    public TaoBaoSessionInfo(String appKey, TopParameter appParams, String topSession, String appSecret, String parentbaihuipw, String baihuiuserid, String crmApiKey) {
        this.appKey = appKey;
        this.topParameter = appParams;
        this.topSession = topSession;
        this.appSecret = appSecret;
        this.parentbaihuipw = parentbaihuipw;
        this.parentbaihuiuserid = baihuiuserid;
        this.crmApiKey = crmApiKey;
        if (appParams != null) {
            this.visitor_id = appParams.getVisitor_id();
            this.visitor_nick = appParams.getVisitor_nick();
            this.expires_in = appParams.getExpires_in();
            this.sub_visitor_id = appParams.getSub_visitor_id();
            this.sub_visitor_nick = appParams.getSub_visitor_nick();
        }
    }

    public TaoBaoSessionInfo() {
		// TODO Auto-generated constructor stub
	}

	public int getTbMaxCount() {
        return tbMaxCount;
    }

    public void setTbMaxCount(int tbMaxCount) {
        this.tbMaxCount = tbMaxCount;
    }

    public int getBhMaxCount() {
        return bhMaxCount;
    }

    public void setBhMaxCount(int bhMaxCount) {
        this.bhMaxCount = bhMaxCount;
    }

    public String getCrmApiKey() {
        return crmApiKey;
    }

    public void setCrmApiKey(String crmApiKey) {
        this.crmApiKey = crmApiKey;
    }

    public String getParentbaihuiuserid() {
        return parentbaihuiuserid;
    }

    public void setParentbaihuiuserid(String parentbaihuiuserid) {
        this.parentbaihuiuserid = parentbaihuiuserid;
    }

    public String getParentbaihuipw() {
        return parentbaihuipw;
    }

    public void setParentbaihuipw(String parentbaihuipw) {
        this.parentbaihuipw = parentbaihuipw;
    }

    public int getSub_visitor_id() {
        return sub_visitor_id;
    }

    public String getSub_visitor_nick() {
        return sub_visitor_nick;
    }

    public String getAppKey() {
        return appKey;
    }

    public void setAppKey(String appKey) {
		this.appKey = appKey;
	}

	public void setTopParameter(TopParameter topParameter) {
		this.topParameter = topParameter;
	}

	public void setTopSession(String topSession) {
		this.topSession = topSession;
	}

	public void setAppSecret(String appSecret) {
		this.appSecret = appSecret;
	}

	public void setVisitor_id(int visitor_id) {
		this.visitor_id = visitor_id;
	}

	public void setExpires_in(long expires_in) {
		this.expires_in = expires_in;
	}

	public void setSub_visitor_id(int sub_visitor_id) {
		this.sub_visitor_id = sub_visitor_id;
	}

	public void setSub_visitor_nick(String sub_visitor_nick) {
		this.sub_visitor_nick = sub_visitor_nick;
	}

	public TopParameter getTopParameter() {
        return topParameter;
    }

    public String getTopSession() {
        return topSession;
    }

    public String getAppSecret() {
        return appSecret;
    }

    public int getVisitor_id() {
        return visitor_id;
    }

    public void setVisitor_nick(String visitor_nick) {
        this.visitor_nick = visitor_nick;
    }

    public String getVisitor_nick() {
        return visitor_nick;
    }

    public long getExpires_in() {
        return expires_in;
    }

    public void setValid(boolean valid) {
        this.valid = valid;
    }

    public boolean isValid() {
        return valid;
    }

	/**
	 * @return the productImportProgress
	 */
	public int getProductImportProgress() {
		return productImportProgress;
	}

	/**
	 * @param productImportProgress the productImportProgress to set
	 */
	public void setProductImportProgress(int productImportProgress) {
		this.productImportProgress = productImportProgress;
	}

	/**
	 * @return the itemCatImportProgress
	 */
	public int getItemCatImportProgress() {
		return itemCatImportProgress;
	}

	/**
	 * @param itemCatImportProgress the itemCatImportProgress to set
	 */
	public void setItemCatImportProgress(int itemCatImportProgress) {
		this.itemCatImportProgress = itemCatImportProgress;
	}

	/**
	 * @return the orderImportProgress
	 */
	public int getOrderImportProgress() {
		return orderImportProgress;
	}

	/**
	 * @param orderImportProgress the orderImportProgress to set
	 */
	public void setOrderImportProgress(int orderImportProgress) {
		this.orderImportProgress = orderImportProgress;
	}

	public int getUser_id() {
		return user_id;
	}

	public void setUser_id(int user_id) {
		this.user_id = user_id;
	}

	public Date getLastSyncTime() {
		return lastSyncTime;
	}

	public void setLastSyncTime(Date lastSyncTime) {
		this.lastSyncTime = lastSyncTime;
	}

}
